package schedule

import (
	"encoding/hex"
	"hy_808/protocol/hygprs"
	"strings"
)

/*
调度令确认包

调度令回应
+0  80 00 2E 02 18 6F 8C
+7  01 00 00 0C 1D
+12 02 00 00 91 31
+17 03 01
+19 13 00 01 86 A1
+24 06 62 29 6C AD
+29 07 03 B6 AF 4D
+34 08 01 0D 52 61
+39 22 00 (调度令确认；0机器收到后的回应(最少为10秒)。3驾驶员手动的确认
+41 00 00 08 41 81
+46
*/

type Answer struct {
	hygprs.Fields
}

func GenCommandACK() Answer {
	data, _ := hex.DecodeString(strings.ReplaceAll("80 00 2E 02 00 3F 8C 01 00 00 00 16 02 00 01 88 A8 03 21 13 00 01 86 A1 06 62 29 72 5A 07 03 B5 7F C8 08 01 0F 01 CC 22 00 00 00 08 8E 81", " ", ""))
	p := Answer{}
	p.Packet = hygprs.MakePacket(data)
	return p
}
